package com.block.datapush.form.item.util;

import cn.hutool.core.util.StrUtil;
import com.block.common.enums.BaseTypeInfoEnum;

public class YiJieUtil {

    public static Integer getHouse(String house){
        if (StrUtil.equals(BaseTypeInfoEnum.House.hu001.getValue(), house)){
            return 1;
        }
        return 3;
    }

    public static Integer getCar(String car){
        if (StrUtil.equals(BaseTypeInfoEnum.Car.car001.getValue(), car)){
            return 1;
        }
        return 3;
    }

    public static Integer getSheBao(String house){
        if (StrUtil.equals(BaseTypeInfoEnum.SocialInsurance.si001.getValue(), house)){
            return 1;
        }
        return 3;
    }

    public static Integer getGjj(String gjj){
        if (StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj001.getValue(), gjj)){
            return 1;
        }
        return 3;
    }

    public static Integer getBaoXian(String baoxian){
        if (StrUtil.equals(BaseTypeInfoEnum.Insurance.in001.getValue(), baoxian)){
            return 1;
        }
        return 3;
    }

    /**
     *  0:⽆,1:350-549,2:550-599,3:600-649,4:650-699,5:>=700
     * @param zhima
     * @return
     */
    public static Integer getZhima(String zhima){
        if (StrUtil.equals(BaseTypeInfoEnum.ZhimaScore.zm003.getValue(), zhima)){
            return 3;
        }else if (StrUtil.equals(BaseTypeInfoEnum.ZhimaScore.zm004.getValue(), zhima)){
            return 4;
        }else if (StrUtil.equals(BaseTypeInfoEnum.ZhimaScore.zm005.getValue(), zhima)){
            return 5;
        }
        return 3;
    }

}
